<template>
  <div class="store-info">
    <div class="goods-seller-name">
      <b v-if="information.store_type == 1" class="shop-newtype shop-newtype1">专营店</b>
      <b v-else class="shop-newtype shop-newtype1">旗舰店</b>
      <span class="name" :title="information.store_name">{{information.store_name}}</span>
    </div>
    <div class="goods-seller-info">
      <div class="goods-seller-specs">
        <span class="title">主营业务：</span>
        {{information.store_main_buiness ? information.store_main_buiness : '这家伙很懒，什么也没留下'}}
      </div>
      <div class="goods-seller-specs">
        <span class="title">经营地址：</span>
        {{information.store_address}}
      </div>
      <div class="goods-seller-specs">
        <span class="title">卖家：</span>
        {{information.store_username}}
      </div>
      <div class="goods-seller-specs">
        <span class="title" style="vertical-align: middle">信用评级：</span>
        <span class="icon-level-box" v-html="initStoreGrade(0)"></span>
      </div>
    </div>
    <!-- <div class="goods-seller-specs">
        <span class="title" style="vertical-align: middle">在线咨询：</span>
        <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin=2112574008&amp;site=qq&amp;menu=yes">
          <img border="0" src="http://wpa.qq.com/pa?p=2:43036456:51" alt="点击这里给我发消息" title="点击这里给我发消息">
        </a>
      </div>
      <div class="goods-seller-btn">
        <a href="http://test.mutouyun.com:9217/store/368.html">进店逛逛</a>
    </div>-->
  </div>
</template>
<script>
export default {
  props: {
    information: {
      type: Object,
    },
  },
  data() {
    return {};
  },
  mounted() {
    console.log("店铺信息", this.information);
  },
  methods: {
    initStoreType() {
      // console.log(1)
    },
    initStoreGrade(grade) {
      var xinyong = "";
      if (grade >= 191) {
        xinyong = '<i class="icon-level icon-level-3"></i>';
      } else if (grade >= 131) {
        xinyong =
          '<i class="icon-level icon-level-2"></i><i class="icon-level icon-level-2"></i><i class="icon-level icon-level-2"></i>';
      } else if (grade >= 91) {
        xinyong =
          '<i class="icon-level icon-level-2"></i><i class="icon-level icon-level-2"></i>';
      } else if (grade >= 41) {
        xinyong = '<i class="icon-level icon-level-2"></i>';
      } else if (grade >= 11) {
        xinyong =
          '<i class="icon-level icon-level-1"></i><i class="icon-level icon-level-1"></i>';
      } else {
        xinyong = '<i class="icon-level icon-level-1"></i>';
      }
      return xinyong;
    },
  },
};
</script>
<style lang="scss" scoped>
.store-info {
  background: #fff;
  border: 1px solid #ebeff1;
  width: 100%;
  margin-top: 50px;
  .goods-seller-name {
    font-size: 16px;
    font-weight: bold;
    border-bottom: 1px solid #ebf0f2;
    background: #ebeff1;
    padding: 0 7%;
    overflow: hidden;
    line-height: 55px;
    height: 55px;
    white-space: nowrap;
    text-overflow: ellipsis;

    .name {
      height: 16px;
      line-height: 16px;
      vertical-align: middle;
      margin-left: 5px;
    }
  }
  .goods-seller-info {
    padding: 7%;
    .goods-seller-specs {
      font-size: 14px;
      color: #333;
      line-height: 34px;
      .title {
        display: inline-block;
        color: #999;
        width: 80px;
      }
      .icon-level-box {
        margin-left: 5px;
      }
    }
  }
}
</style>

